package com.softeem.mapper;

import com.softeem.entity.Book;
import com.softeem.vo.BookId;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface BookMapper {
    List<Book> findBookAllGtId(List<Long> ids);

    @Select("select * from book where cid=#{cid}")
    List<Book> findBookAllByCid(int cid);

    @Transactional(propagation = Propagation.REQUIRED)
    int updateBook(@Param("title") String title,@Param("id") int id);


}
